Field of the Invention
The present invention relates to an information processing apparatus and information processing method for deciding a timeout time used when acquiring data from a server, and a storage medium storing a program.
Description of the Related Art
There is known a system which acquires image data from an image providing server (to be referred to as a server hereinafter) present on a Web, and performs image processing such as printing or display based on the acquired image data.
In this system, when an information processing apparatus acquires data from the server, a timeout value for timeout of communication between the information processing apparatus and the server is sometimes set. If the timeout value is set as unnecessarily large, the user needs to wait for an excessively long time when a communication error occurs. If the timeout value is set as unnecessarily small, it is determined that a timeout has occurred, and communication is interrupted, though the server executes processing normally.
Japanese Patent Laid-Open No. 2001-197124 discloses a technique in which a gateway apparatus determines whether the communication partner is a cellular terminal or a terminal which communicates via a satellite, and sets different timeout values based on the determination result.
In Japanese Patent Laid-Open No. 2001-197124, the timeout value is set in accordance with a communication partner. However, when acquiring data from a server, the time until data is acquired even from the same server may change depending on processing to be executed for data in the server. For example, when acquiring data from a server by a data acquisition apparatus, the server sometimes converts the data format of data to be acquired and then transmits the data to the data acquisition apparatus. In this case, the time until the data acquisition apparatus acquires data changes depending on the presence/absence of data format conversion processing. Therefore, even when the timeout value is set in accordance with a communication partner, as described in the conventional technique, no appropriate timeout value may be set depending on processing for data.